// 测试密码加密
var bcrypt = require('bcryptjs')
let userPwd = '123456'
let salt = bcrypt.genSaltSync(10);
let hash = bcrypt.hashSync(userPwd, salt);

let compare1 = bcrypt.compareSync('123456', '$2a$10$m4dr1KQkM/4Rdy9Kvqm0U.a/gOAz/UWaD9rroOMAAUqpmrjEUNOP2')
let compare2 = bcrypt.compareSync('123456', hash)

console.log('compare1', compare1)
console.log('compare2', compare2)
console.log(hash)